package com.hod.client.backend.orm.rebind;

import com.google.gwt.http.client.Request;
import com.google.gwt.http.client.RequestBuilder;
import com.google.gwt.http.client.RequestCallback;
import com.google.gwt.http.client.RequestException;
import com.google.gwt.http.client.Response;
import com.google.gwt.http.client.RequestBuilder.Method;

/***
 * Not done ... yet
 * @author matias
 *
 */

public class HttpRequest {
	public static final void sendRequest(final String requestedURL, Method method, String requestData){                 
        final RequestBuilder builder = new RequestBuilder(method,requestedURL );
		try {		  
		  @SuppressWarnings("unused")
		  Request req = builder.sendRequest(requestData, new RequestCallback() {
		         public void onError(final Request request, final Throwable t) {
		         }
		         public void onResponseReceived(Request request, Response response) {
		       			if((response.getStatusCode() == 200)||response.getStatusCode() == 304) {
			
		                } else if(response.getStatusCode() == 404) {
		                }
			
		         }					
		 });
		  
		} 
		catch (RequestException re) {
		}
	}
}
